package com.zx.crowdfunding.mapper;

import com.zx.crowdfunding.entity.Operation;
import com.zx.crowdfunding.entity.OperationExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface OperationMapper {
    int countByExample(OperationExample example);

    int deleteByExample(OperationExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Operation record);

    int insertSelective(Operation record);

    List<Operation> selectByExample(OperationExample example);

    Operation selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Operation record, @Param("example") OperationExample example);

    int updateByExample(@Param("record") Operation record, @Param("example") OperationExample example);

    int updateByPrimaryKeySelective(Operation record);

    int updateByPrimaryKey(Operation record);
    
    /**
	 * 根据操作id删除操作与权限的关联关系数据
	 * @param operationId 操作id
	 */
	void deleteOperationAuthRelationship(Integer operationId);

	/**
	 * 添加操作与权限的关联关系数据
	 * @param operationId 操作id
	 * @param authIdList 权限id的List集合
	 */
	void insertOperationAuthRelationship(@Param("operationId") Integer operationId, @Param("authIdList") List<Integer> authIdList);

}